Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.user.center.profile.layouts

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.user.center.profile.layouts">

  <require>org.nuxeo.ecm.platform.forms.layouts.webapp</require>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="widgettypes">
    <widgetType name="summary_user_profile">
      <configuration>
        <sinceVersion>5.5</sinceVersion>
        <title>User Profile Summary</title>
        <description>
          <p>This widget displays the user profile layout.</p>
        </description>
        <categories>
          <category>configuration_not_ready</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <!-- no configurable properties -->
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/summary/user_profile_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="avatar">
      <configuration>
        <sinceVersion>5.5</sinceVersion>
        <title>User Profile Avatar</title>
        <description>
          Widget allowing to upload a picture for the user
          avatar.
        </description>
        <categories>
          <category>configuration_not_ready</category>
        </categories>
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/avatar_widget_template.xhtml
      </property>
    </widgetType>
    <widgetType name="summary_user_preferences">
      <configuration>
        <sinceVersion>5.6</sinceVersion>
        <title>User Profile Summary</title>
        <description>
          <p>This widget displays the user preferences layout.</p>
        </description>
        <categories>
          <category>configuration_not_ready</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <!-- no configurable properties -->
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/summary/user_preferences_widget_template.xhtml
      </property>
    </widgetType>
  </extension>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="widgets">

    <widget name="summary_user_profile" type="summary_user_profile" />

    <widget name="summary_user_preferences" type="summary_user_preferences" />

    <widget name="avatar" type="avatar">
      <labels>
        <label mode="any">label.userprofile.avatar</label>
      </labels>
      <translated>true</translated>
      <helpLabels>
        <label mode="edit">
          helplabel.userprofile.avatar
        </label>
      </helpLabels>
      <fields>
        <field></field>
        <field>userprofile:avatar</field>
      </fields>
      <properties mode="any">
        <property name="file_property_name">userprofile:avatar</property>
      </properties>
    </widget>

    <widget name="birthdate" type="datetime">
      <labels>
        <label mode="any">label.userprofile.birthdate</label>
      </labels>
      <translated>true</translated>
      <helpLabels>
        <label mode="edit">
          helplabel.userprofile.birthdate
        </label>
      </helpLabels>
      <fields>
        <field>userprofile:birthdate</field>
      </fields>
      <properties widgetMode="any">
        <property name="pattern">#{nxu:basicDateFormater()}</property>
      </properties>
      <properties widgetMode="edit">
        <property name="format">#{nxu:basicDateFormater()}</property>
      </properties>
    </widget>

    <widget name="phonenumber" type="text">
      <labels>
        <label mode="any">label.userprofile.phonenumber</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>userprofile:phonenumber</field>
      </fields>
      <properties widgetMode="edit">
        <property name="styleClass">dataInputText</property>
      </properties>
    </widget>

    <widget name="gender" type="template">
      <labels>
        <label mode="any">label.userprofile.gender</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>userprofile:gender</field>
      </fields>
      <properties mode="any">
        <property name="template">/widgets/gender_widget_template.xhtml
        </property>
      </properties>
    </widget>

    <widget name="locale" type="selectOneDirectory">
      <labels>
        <label mode="any">label.userpreferences.locale</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>userprofile:locale</field>
      </fields>
      <properties widgetMode="any">
        <property name="localize">false</property>
        <property name="directoryName">locale</property>
        <property name="displayIdAndLabel">false</property>
        <property name="required">false</property>
      </properties>
    </widget>

    <widget name="timezone" type="template">
      <labels>
        <label mode="any">label.userpreferences.timezone</label>
      </labels>
      <translated>true</translated>
      <widgetModes>
        <mode value="view">view</mode>
        <mode value="any">hidden</mode>
      </widgetModes>
      <properties mode="any">
        <property name="template">/widgets/timezone_widget_template.xhtml
        </property>
      </properties>
    </widget>

  </extension>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="layouts">

    <layout name="summary_user_profile_layout">
      <templates>
        <template mode="any">/layouts/layout_summary_template.xhtml
        </template>
      </templates>
      <rows>
        <row>
          <widget>summary_user_profile</widget>
        </row>
      </rows>
    </layout>

    <layout name="userprofile">
      <templates>
        <template mode="any">/layouts/layout_default_template.xhtml
        </template>
      </templates>

      <rows>
        <row>
          <widget>avatar</widget>
        </row>
        <row>
          <widget>birthdate</widget>
        </row>
        <row>
          <widget>phonenumber</widget>
        </row>
        <row>
          <widget>gender</widget>
        </row>
      </rows>
    </layout>

    <layout name="summary_user_preferences_layout">
      <templates>
        <template mode="any">/layouts/layout_summary_template.xhtml
        </template>
      </templates>
      <rows>
        <row>
          <widget>summary_user_preferences</widget>
        </row>
      </rows>
    </layout>

    <layout name="userpreferences">
      <templates>
        <template mode="any">/layouts/layout_default_template.xhtml
        </template>
      </templates>

      <rows>
        <row>
          <widget>locale</widget>
        </row>
        <row>
          <widget>timezone</widget>
        </row>
      </rows>
    </layout>

  </extension>

</component>